-
Notifications
You must be signed in to change notification settings - Fork 6
rrdp: discard stats #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 14044455376Details
💛 - Coveralls |
6656ca0
to
8cc3781
Compare
@@ -42,6 +42,28 @@ type stats = { | |||
} | |||
[@@little_endian]] | |||
|
|||
[%%cstruct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need a V2 I think. You can put it in the stats struct and just have wrappers that checks version when accessing these specific fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But as discussed the problem is now we are not able to know the size of v1 vs the size of v2 that is used by "copy"... So it looks like a v2 is needed. To avoid generating unneeded function you can do something like:
type stats_v2 = {
_version: uint32_t
; _pad: uint32_t
; _oo_reqs: uint64_t
; _read_reqs_submitted: uint64_t
; _read_reqs_completed: uint64_t
; _read_sectors: uint64_t
; _read_total_ticks: uint64_t
; _write_reqs_submitted: uint64_t
; _write_reqs_completed: uint64_t
; _write_sectors: uint64_t
; _write_total_ticks: uint64_t
; _io_errors: uint64_t
; _flags: uint64_t
; discard_reqs_submitted: uint64_t
; discard_reqs_completed: uint64_t
; discard_sectors: uint64_t
; discard_total_ticks: uint64_t
}
[@@little_endian]]
Not sure if it is the correct approach but you will have both sizes and new successors accessors to V2 fields...
565cf1c
to
09746c2
Compare
Signed-off-by: Anthoine Bourgeois <[email protected]>
09746c2
to
a1b83c1
Compare
It looks good to me. At least I don't see a better way to do that. Also as it manages the blktap V2 struct I think that it can be proposed upstream... maybe? |
Add an extended stats structure to get discards' fields and compute new statistics: